Skip to content

Rework the serializers using the DateTimeFormat API #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dkhalanskyjb
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb commented Jul 23, 2024

  • Default serializers are separated from the ISO serializers, which now mirror the behavior of Formats.ISO instead of toString/parse.
  • New API: custom serializers parameterized with a DateTimeFormat.
  • Serial names are properly distinct for incompatible formats.

Fixes #350
Fixes #351
Fixes #416

@dkhalanskyjb dkhalanskyjb force-pushed the custom-serializers branch 2 times, most recently from 314121a to aec4a6c Compare July 25, 2024 13:12
@dkhalanskyjb dkhalanskyjb changed the title Provide custom serializers based on DateTimeFormat Rework the serializers using the DateTimeFormat API Jul 25, 2024
@dkhalanskyjb dkhalanskyjb marked this pull request as ready for review July 25, 2024 13:45
@dkhalanskyjb dkhalanskyjb requested a review from ilya-g July 25, 2024 13:45
@dkhalanskyjb dkhalanskyjb added this to the 0.7.0 milestone Mar 3, 2025
@dkhalanskyjb dkhalanskyjb force-pushed the custom-serializers branch 3 times, most recently from 512625e to a2af7bf Compare March 20, 2025 10:04
The names of the serializers are still under discussion, but
it's already decided that the serializers are going to be abstract
classes.

Fixes #350
Sometimes, `X.Formats.ISO` and `X.parse()`/`X.toString()` behave
subtly differently; currently, it's the case for `LocalDateTime`
and `LocalTime`.

With this change, every entity that supports custom formats obtains
a separate default serializer in addition to the
ISO 8601 serializer, which now properly delegates to the
corresponding `DateTimeFormat`.

Fixes #351
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant